package com.zcyh.exam.mapper.education;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zcyh.exam.model.dto.TestPaperInfoDto;
import com.zcyh.exam.model.dto.TestPaperQuestionDto;
import com.zcyh.exam.model.entity.TestPaperInfo;
import com.zcyh.exam.model.request.TestPaperQuestionRequest;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @author zengjintao
 * @version 1.0
 * @create_at 2020/11/20 21:27
 */
public interface TestPaperInfoMapper extends BaseMapper<TestPaperInfo> {


    /**
     * 试卷列表
     * @param page
     * @param codesGroups 区域codes
     * @param startTime
     * @param endTime
     * @param name
     * @param status 0未开始 1进行中 2一结束
     * @return
     */
    Page<TestPaperInfoDto> selectPageList(Page<TestPaperInfoDto> page,
                                          @Param("codesGroups") Set<String> codesGroups,
                                          @Param("startTime") String startTime,
                                          @Param("endTime") String endTime,
                                          @Param("name") String name,
                                          @Param("status") Integer status,
                                          @Param("publishFlag")boolean publishFlag);

    /**
     * 查询网格员需要参加的考试
     * @param page
     * @param codesGroups
     * @param userId
     * @return
     */
    Page<TestPaperInfoDto> selectStudentPageList(Page<TestPaperInfoDto> page, @Param("codesGroups") List<String> codesGroups,@Param("userId") String userId);

    /**
     * 试卷试题列表
     * @param page
     * @param testPaperQuestionRequest
     * @return
     */
    Page<TestPaperQuestionDto> selectPaperQuestionList(Page<TestPaperQuestionDto> page, TestPaperQuestionRequest testPaperQuestionRequest);

}
